package com.lzk.product.openfeignClients;

import com.lzk.JsonResult;
import com.lzk.domain.Store;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ProFeignClientFallbackFactory implements FallbackFactory<ProductFeignClient> {


    @Override
    public ProductFeignClient create(Throwable throwable) {
        return new ProductFeignClient() {
            @Override
            public JsonResult save(Store store) {
                return new JsonResult(false,"熔断开启");
            }
        };
    }
}
